/**
 * 
 */
package com.jinmei.remote.request;

import java.util.HashMap;
import java.util.Map;

/**
 * @author richard
 *
 */
public abstract class RequestBuilder {

    protected RequestParametersApplier applier;
    protected Map<String, Object> parameters = new HashMap<String, Object>();

    protected String url;

    protected RequestBuilder(String url) {
        this.url = url;
    }

    public BaseClientRequest buildQueryMessage() throws Exception {
    	BaseClientRequest request = createClientRequest();
        this.applier = new RequestParametersApplier();
        return applier.applyParameters(request, parameters);
    }

	public abstract BaseClientRequest createClientRequest();

}
